//
//  BJArticleHeaderViewTableViewCell.m
//  BowJoy
//
//  Created by  on 2024/5/22.
//

#import "BJArticleHeaderViewTableViewCell.h"
#import "SDCycleScrollView.h"

@implementation BJArticleHeaderViewTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.bannerBgView addSubview:self.bannerView];
    // Initialization code
}

- (void)setModel:(BJAnchorWallModelData *)model{
    NSArray *imageArr = [model.imageArrStr componentsSeparatedByString:@","];
    // 设置轮播视图的图片数组
    self.bannerView.imageURLStringsGroup = imageArr;

}
-(SDCycleScrollView *)bannerView{
    if(_bannerView==nil){
        _bannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0,0, kScreenW-40,500) delegate:self placeholderImage:nil];//广告占位图
        _bannerView.tag = 100;
        _bannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
        _bannerView.currentPageDotColor = [UIColor whiteColor]; // 自定义分页控件小圆标颜色
        _bannerView.pageDotColor = [[UIColor whiteColor]colorWithAlphaComponent:0.35];
        _bannerView.autoScroll = YES;
        _bannerView.layer.masksToBounds = YES;
        _bannerView.layer.cornerRadius = 12;
        _bannerView.backgroundColor = UIColor.clearColor;
        _bannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
        _bannerView.pageControlStyle = SDCycleScrollViewPageContolStyleClassic;
        _bannerView.pageControlDotSize = CGSizeMake(4, 4);

        
    }
    return _bannerView;
    
}
/** 点击图片回调 */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
       
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
